import { lazy } from 'react'
import { EditModal } from '@/desktop/components'
import { Suspense } from '@/desktop/components/Loading'

const Content = lazy(async () => import('./Content'))

export { ReactComponent as Icon } from './icon.svg'

export function AutoTransfer({ open, onClose }: { open: boolean; onClose: () => void }) {
  return <EditModal title="自动转交" width="1000px" open={open} onCancel={onClose}>
    {open ? (
      <Suspense>
        <Content />
      </Suspense>
    ) : null}
  </EditModal>
}
